package com.zpark.sports.config;

import org.springframework.context.annotation.Configuration;
import org.springframework.web.servlet.config.annotation.ViewControllerRegistry;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;

/**
 * @author xiaoyu
 * @version 1.0 2022/9/27
 */
@Configuration
public class SportsMvcConfig implements WebMvcConfigurer {
    //配置指定访问路径
    @Override
    public void addViewControllers(ViewControllerRegistry registry) {
        // 当访问根路径的时候，跳转到系统首页
        registry.addViewController("/").setViewName("index");
//        registry.addViewController("/index").setViewName("index");
    }
}
